package common

import (
	"flag"
)

//
var (
	CmdFlags = &Cmd{}
)

type Cmd struct {
	VersionFlag bool
	logtosterr  bool
	minloglevel int
}

func init() {
	flag.Usage = printUsage
	flag.BoolVar(&CmdFlags.VersionFlag, "version", false, "print version and exit")
	flag.BoolVar(&CmdFlags.logtosterr, "logtosterr", false, "show err to stdout")
	flag.IntVar(&CmdFlags.minloglevel, "minloglevel", 0, "show log level")

	flag.Parse()
}

func printUsage() {
	//fmt.Printf("Usage: %s [-options] class [args...]\n", os.Args[0])
	flag.PrintDefaults()
}
